﻿@model SchoolCommunicationSystem.Models.DK
@{
    ViewBag.Title = "Đăng ký sổ liên lạc điện tử";
}
<div id="page-heading">
    <h1>Quản lý tài khoản</h1>
</div>
<div class="container">
    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h4>Đăng ký sổ liên lạc điện tử</h4>
                </div>
                <div class="panel-body">
                    @using (Html.BeginForm("EditParent", "Learner", FormMethod.Post, new { @class = "form-horizontal" }))
                    {
                        <b><i>@Html.ActionLink("Đã tồn tại tài khoản phụ huynh?", "AddParentIDToLearner", new { id = Model.Learners.learnerID })</i></b>
                        <h3>Tài khoản phụ huynh</h3>
                        @Html.ValidationSummary(true)
                        @Html.HiddenFor(model => model.Learners.learnerID)
                        @Html.HiddenFor(model => model.Learners.lastName)
                        @Html.HiddenFor(model => model.Learners.gender)
                        @Html.HiddenFor(model => model.Learners.firstName)
                        @Html.HiddenFor(model => model.Learners.dateOfBirth)
                        @Html.HiddenFor(model => model.Learners.classID)
                        @Html.HiddenFor(model => model.Learners.birthPlace)
                        @Html.HiddenFor(model => model.Learners.address)
                        <div class="form-group">
                            @Html.Label("Tên phụ huynh:", new { @class = "col-sm-3 control-label" })
                            <div class="col-sm-6">
                                @Html.EditorFor(model => model.parent.parentName)
                            </div>
                            <div class="col-sm-3">
                                @Html.ValidationMessageFor(model => model.parent.parentName)
                            </div>
                        </div>
                        <div class="form-group">
                            @Html.Label("Giới tính:", new { @class = "col-sm-3 control-label" })
                            <div class="col-sm-6">
                                @Html.DropDownListFor(model => model.parent.gender, (IEnumerable<SelectListItem>)ViewBag.Genders)
                            </div>
                            <div class="col-sm-3">
                                @Html.ValidationMessageFor(model => model.parent)
                            </div>
                        </div>
                        <div class="form-group">
                            @Html.Label("Số điện thoại di động:", new { @class = "col-sm-3 control-label" })
                            <div class="col-sm-6">
                                @Html.EditorFor(model => model.parent.mobile)
                            </div>
                            <div class="col-sm-3">
                                @Html.ValidationMessageFor(model => model.parent.mobile)
                            </div>
                        </div>
                        <div class="form-group">
                            @Html.Label("Số điện thoại nhà riêng:", new { @class = "col-sm-3 control-label" })
                            <div class="col-sm-6">
                                @Html.EditorFor(model => model.parent.tel)
                            </div>
                            <div class="col-sm-3">
                                @Html.ValidationMessageFor(model => model.parent.tel)
                            </div>
                        </div>
                        <div class="form-group">
                            @Html.LabelFor(m => m.UserName, new { @class = "col-sm-3 control-label" })
                            <div class="col-sm-6">
                                @Html.EditorFor(m => m.UserName, new { @maxlength = 25 })
                            </div>
                            <div class="col-sm-3">
                                @Html.ValidationMessageFor(m => m.UserName)
                            </div>
                        </div>
                        <div class="form-group">
                            @Html.LabelFor(m => m.Password, new { @class = "col-sm-3 control-label" })
                            <div class="col-sm-6">
                                @Html.PasswordFor(m => m.Password)
                            </div>
                            <div class="col-sm-3">
                                @Html.ValidationMessageFor(m => m.Password)
                            </div>
                        </div>
                        <div class="form-group">
                            @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-sm-3 control-label" })
                            <div class="col-sm-6">
                                @Html.PasswordFor(m => m.ConfirmPassword)
                            </div>
                            <div class="col-sm-3">
                                @Html.ValidationMessageFor(m => m.ConfirmPassword)
                            </div>
                        </div>
                        <div class="form-group">
                            @Html.LabelFor(m => m.Email, new { @class = "col-sm-3 control-label" })
                            <div class="col-sm-6">
                                @Html.EditorFor(m => m.Email)
                            </div>
                            <div class="col-sm-3">
                                @Html.ValidationMessageFor(m => m.Email)
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6 col-sm-offset-3">
                                <div class="btn-toolbar">
                                    <button class="btn-primary btn" type="submit">Tạo Tài Khoản</button>
                                </div>
                            </div>
                        </div>  
                    }
                </div>
            </div>
        </div>
    </div>
</div>
